package com.nightsoul.cxf;

import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;

public class SecondInterceptor extends AbstractPhaseInterceptor<Message> {

	public SecondInterceptor() {
		super(Phase.PRE_INVOKE);
	}

	@Override
	public void handleMessage(Message message) throws Fault {
		System.out.println("code in second interceptor.");
		Object obj = message.getExchange().getEndpoint().get("security");
		System.out.println("security=" + obj);
	}

}
